using JNPF.Basics.Models;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;

namespace JNPF.Basics.Logic
{
    /// <summary>
    /// 数据连接
    /// 版 本：V2.6.200509
    /// 版 权：引迈信息技术有限公司（https://www.yinmaisoft.com）
    /// 作 者：JNPF开发平台组
    /// 日 期：2018-11-29
    /// </summary>
    internal interface DbLinkIService
    {
        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        Task<List<DbLinkEntity>> GetList();
        /// <summary>
        /// 信息
        /// </summary>
        /// <param name="id">主键值</param>
        /// <returns></returns>
        Task<DbLinkEntity> GetInfo(string id);
        /// <summary>
        /// 验证
        /// </summary>
        /// <param name="whereLambda">条件</param>
        /// <returns></returns>
        Task<bool> IsExist(Expression<Func<DbLinkEntity, bool>> whereLambda);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Delete(DbLinkEntity entity);
        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Create(DbLinkEntity entity);
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Update(DbLinkEntity entity);

    }
}
